module.exports = {
    devServer: {
        proxy: {
            '/captcha': {
                target: 'http://bcfl.sdufe.edu.cn/', //接口域名
                changeOrigin: true,       //是否跨域
                ws: true,            //是否代理 websockets
                pathRewrite: {         //路径重置
                    '^/captcha': '/index.php'
                }
            },
            '/login': {
                target: 'http://bcfl.sdufe.edu.cn/', //接口域名
                changeOrigin: true,       //是否跨域
                ws: true,            //是否代理 websockets
                pathRewrite: {         //路径重置
                    '^/login': ''
                }
            },
            '/api': {
                target: 'http://127.0.0.1:8000',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            },
            '/cx': {
                target: 'http://upload.chaojiying.net/',
                changeOrigin: true,
                pathRewrite: {
                    '^/cx': ''
                }
            }
        }
    }
};